package impl.util;

import org.semanticweb.owlapi.model.OWLClassExpression;

public class UtilityAssertion {

	private String				manSyntaxString;
	private double				utilityValue;
	private OWLClassExpression	clEx;

	public UtilityAssertion(String manSyntaxString, double utilityValue, OWLClassExpression clEx) {
		this.manSyntaxString = manSyntaxString;
		this.utilityValue = utilityValue;
		this.clEx = clEx;
	}

	public double getUtilityValue() {
		return this.utilityValue;
	}

	public void setUtilityValue(double utilityValue) {
		this.utilityValue = utilityValue;
	}

	public String getManSyntax() {
		return this.manSyntaxString;
	}

	public void setManSyntax(String manSyntax) {
		this.manSyntaxString = manSyntax;
	}

	@Override
	public String toString() {
		if (this.manSyntaxString != null) {
			return "<" + this.manSyntaxString + ", " + this.utilityValue + ">";
		} else {
			return "<" + this.clEx.toString() + ", " + this.utilityValue + ">";
		}
	}

	public OWLClassExpression getClassExpression() {
		return this.clEx;
	}

	public void setClassExpression(OWLClassExpression clEx) {
		this.clEx = clEx;
	}

	public void changeTo(UtilityAssertion newUtilityAssertion) {
		this.manSyntaxString = newUtilityAssertion.getManSyntax();
		this.utilityValue = newUtilityAssertion.getUtilityValue();
		this.clEx = newUtilityAssertion.getClassExpression();
	}

}
